package form

import "hitme/go-api/models"

type (
    WechatLoginReqForm struct {
        Code          string         `form:"code" json:"code" binding:"required"`
        //EncryptedData string         `form:"encryptedData" json:"encryptedData" binding:"required"`
        //IV            string         `form:"iv" json:"iv" binding:"required"`
        Userinfo      WechatUserInfo `form:"userinfo" json:"userinfo" binding:"required"`
    }

    WechatUserInfo struct {
        Nickname string `json:"nickName"`
        Avatar   string `json:"avatarUrl"`
        Gender   int8   `json:"gender"`
        City     string `json:"city"`
        Country  string `json:"country"`
        Province string `json:"province"`
    }

    Authorize struct {
        Type        string `json:"type"`
        AccessToken string `json:"access_token"`
        ExpiresIn   int64 `json:"expires_in"`
    }

    WechatLoginRespForm struct {
        Authorize Authorize      `json:"authorize"`
        UserInfo  models.User `json:"user_info"`
    }
)